package com.cookie.lib_base.service

import android.app.IntentService
import android.content.Intent
import com.cookie.lib_base.helper.ConstellHelper
import com.cookie.lib_base.helper.SoundPoolHelper
import com.cookie.lib_base.helper.`fun`.AppHelper
import com.cookie.lib_base.helper.`fun`.CommonSettingHelper
import com.cookie.lib_base.util.L
import com.cookie.lib_base.util.SpUtils
import com.cookie.lib_voice.words.WordsTools

/**
 *   文件名:    InitService
 *   创建者:    cookie
 *   创建时间:   2020/10/13 11:50
 *   描述:      初始化服务
 */
class InitService :IntentService(InitService::class.simpleName){

    override fun onCreate() {
        super.onCreate()
        L.i("初始化开始")
    }

    override fun onHandleIntent(intent: Intent?) {
        L.i("执行初始化操作")
        SpUtils.initUtils(this)
        WordsTools.initTools(this)
        SoundPoolHelper.init(this)
        AppHelper.initHelper(this)
        CommonSettingHelper.initHelper(this)
        ConstellHelper.initHelper(this)
    }

    override fun onDestroy() {
        super.onDestroy()
        L.i("初始化完成")
    }
}